package com.byb.server.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springframework.data.elasticsearch.annotations.Document;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * 微信保险公司
 */
@ApiModel(description = "微信保险公司")
@Entity
@Table(name = "wc_isurer")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Document(indexName = "wcisurer")
public class WcIsurer implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(name = "jhi_log")
    private String log;

    @Column(name = "name")
    private String name;

    @Column(name = "info")
    private String info;

    /**
     * 运营
     */
    @ApiModelProperty(value = "运营")
    @Column(name = "operation")
    private String operation;

    /**
     * 股东
     */
    @ApiModelProperty(value = "股东")
    @Column(name = "shareholder")
    private String shareholder;

    /**
     * 理赔
     */
    @ApiModelProperty(value = "理赔")
    @Column(name = "claims")
    private String claims;

    @Column(name = "phone")
    private String phone;

    @Column(name = "work_time")
    private String workTime;

    // jhipster-needle-entity-add-field - Jhipster will add fields here, do not remove
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLog() {
        return log;
    }

    public WcIsurer log(String log) {
        this.log = log;
        return this;
    }

    public void setLog(String log) {
        this.log = log;
    }

    public String getName() {
        return name;
    }

    public WcIsurer name(String name) {
        this.name = name;
        return this;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getInfo() {
        return info;
    }

    public WcIsurer info(String info) {
        this.info = info;
        return this;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getOperation() {
        return operation;
    }

    public WcIsurer operation(String operation) {
        this.operation = operation;
        return this;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String getShareholder() {
        return shareholder;
    }

    public WcIsurer shareholder(String shareholder) {
        this.shareholder = shareholder;
        return this;
    }

    public void setShareholder(String shareholder) {
        this.shareholder = shareholder;
    }

    public String getClaims() {
        return claims;
    }

    public WcIsurer claims(String claims) {
        this.claims = claims;
        return this;
    }

    public void setClaims(String claims) {
        this.claims = claims;
    }

    public String getPhone() {
        return phone;
    }

    public WcIsurer phone(String phone) {
        this.phone = phone;
        return this;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getWorkTime() {
        return workTime;
    }

    public WcIsurer workTime(String workTime) {
        this.workTime = workTime;
        return this;
    }

    public void setWorkTime(String workTime) {
        this.workTime = workTime;
    }
    // jhipster-needle-entity-add-getters-setters - Jhipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        WcIsurer wcIsurer = (WcIsurer) o;
        if (wcIsurer.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), wcIsurer.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "WcIsurer{" +
            "id=" + getId() +
            ", log='" + getLog() + "'" +
            ", name='" + getName() + "'" +
            ", info='" + getInfo() + "'" +
            ", operation='" + getOperation() + "'" +
            ", shareholder='" + getShareholder() + "'" +
            ", claims='" + getClaims() + "'" +
            ", phone='" + getPhone() + "'" +
            ", workTime='" + getWorkTime() + "'" +
            "}";
    }
}
